package cn.tedu.smartos.family_user.mapper;

import cn.tedu.smartos.family_user.pojo.entity.MedicationReminder;
import cn.tedu.smartos.family_user.pojo.vo.MedicationReminderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MedicationReminderMapper {
    int insert(MedicationReminder reminder);
    int update(MedicationReminder reminder);
    int deleteById(Long reminderId);
    MedicationReminderVO findById(Long reminderId);
    List<MedicationReminderVO> findByElderlyUserId(Long elderlyUserId);
    List<MedicationReminder> findActiveRemindersForTime(
            @Param("currentTime") String currentTime,
            @Param("dayOfWeek") int dayOfWeek);
    int updateActiveStatus(
            @Param("reminderId") Long reminderId,
            @Param("isActive") Integer isActive);
    List<MedicationReminderVO> findAll();
    List<MedicationReminderVO> findByFamilyUserId(Long familyUserId);
}